/**
 * @Classname LazySingleton
 * @Description TODO
 * @Date 2023/8/15 18:23
 * @Created by wpc
 */
public class LazySingleton {
    private static LazySingleton lazySingleton;

    private LazySingleton(){
    }
    public static synchronized LazySingleton getInstance(){
        if(lazySingleton == null){
            lazySingleton = new LazySingleton();
        }
        return lazySingleton;
    }
    public void test(){
        System.out.println("测试懒加载成功");
    }
}
